Ordered that the order is reversed, on the law, with costs, and the defendants' motion pursuant to CPLR 3211 (a) (7) to dismiss the complaint is granted.
Contrary to the plaintiffs' contention, the defendants' motion was not procedurally improper, as a defendant may properly move to dismiss a complaint pursuant to CPLR 3211 (a) (7) in either a pre-answer motion or in a post-answer motion (see CPLR 3211 [e]; Butler v Catinella, 58 A.D.3d 145, 151 [2008]).
On a motion to dismiss pursuant to CPLR 3211 (a) (7) for failure to state a cause of action, the complaint must be liberally construed in the light most favorable to the plaintiff and all allegations must be accepted as true (see Leon v Martinez, 84 N.Y.2d 83, 87 [1994]). In this context, "the sole criterion is whether the pleading states a cause of action, and if from its four corners factual allegations are discerned which taken together manifest any cause of action cognizable at law a motion for dismissal will fail" (Guggenheimer v Ginzburg, 43 N.Y.2d 268, 275 [1977]).
Here, the defendants are entitled to dismissal of the complaint insofar as asserted against the defendants who are members of the Town Board of the Town/Village of Harrison (hereinafter collectively the Town Board defendants) based on the principle of absolute immunity. Local legislators are "absolutely immune from suit under [42 USC] § 1983 for their legislative activities" (Bogan v Scott-Harris, 523 U.S. 44, 49 [1998]), and such immunity is applicable to all actions within the "sphere of legitimate legislative activity" (Tenney v Brandhove, 341 U.S. 367, 376 [1951]). The allegations asserted in the complaint against the Town Board defendants are based on actions that were legislative and within the sphere of legislative activity. Therefore, the Town Board defendants are entitled to absolute immunity (see Matter of Nocro, Ltd. v Russell, 94 A.D.3d 894, 895 [2012]; see also The Anderson Group, LLC v City of Saratoga Springs, 557 F.Supp.2d 332, 344-345 [ND NY 2008], affd 336 Fed Appx 21 [2d Cir 2009]).
The defendants are also entitled to dismissal of the complaint
In light of our determination, we need not reach the parties' remaining contentions.